from django.conf.urls.defaults import *
from coursemanagement1.myapp import views
from django.conf import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'coursemanagement.views.home', name='home'),
    # url(r'^coursemanagement/', include('coursemanagement.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
	(r'^admin/', include(admin.site.urls)),
	('^showcourse/$',views.Show_Course),
	('^section/(\d{1,2})$',views.Section_Detail),
	('^studentlist/(\d{1,5})$',views.Student_List),
	('^lab/(\d{1,5})$',views.Lab_List),
	('^midterm/(\d{1,5})$',views.Midterm_List),
	('^final/(\d{1,5})$',views.Final_List),
	('^add/score/$',views.ShowForm_AddScore),
	('^save/student/$',views.Save_Student),
	('^edit/score/$',views.ShowForm_EditScore),
	('^edit/score/sec/(\d{1,2})$',views.EditScore_Section),
	('^edit/ID/(\d{1,10})$',views.Edit_Score),
	('^add/course/$',views.ShowForm_AddCourse),
	('^save/course/$',views.Save_Course),
	('^edit/course/(\d{1,2})$',views.Edit_Course),
	('^show/grade/$',views.ShowForm_GradeSec),
	('^show/grade/sec/(\d{1,2})$',views.Show_GradeSec),
	('^show/grade/allsec/$',views.Show_GradeAllSec),
	('^$',views.ShowForm_login),
	('^select/$',views.Show_List),
	('^show/grade/(\d{1,10})$',views.ShowGrade_StudentID),
	('^view/profile$',views.View_Profile),


    # urls from Jack -------------
    ('^show/histrogram/score/all/sec/$',views.ShowHistrogram_ScoreAllSec),
	('^show/histrogram/score/sec(\d{1,2})$',views.ShowHistrogram_ScoreSec),
    ('^show/histrogram/grade/all/sec/$',views.HistorgramGradeAll),
    ('^show/histrogram/grade/sec(\d{1,2})$',views.HistorgramGradeSec),
    # urls from Koe&Joe -------------
    ('^upload/$',views.upload),
    ('^import_file/$',views.import_file),
    #(r'^table/$', views.table),
    #('^taPage$', views.taPage),
    ('^register$', views.register),
    ('^regis_success/$', views.regis_success),
    ('^changePass$', views.changePass),
    ('^changePassSuccess$', views.changePassSuccess),
                       
    # urls for media file              
    (r'^media/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.MEDIA_ROOT}),
)
